package com.example.springboot.controller;

import com.example.springboot.interceptor.RepeatSubmit;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 对添加 {@link  RepeatSubmit} 注解的Controller进行验证
 * <p> 验证拦截器是否发生作用
 * <p>
 * @author Zhang.Z
 * @version 2025-09-20
 */
@RestController
@RepeatSubmit
public class InterceptorController {

    /**
     * 拦截器放行的url
     *
     */
    @RequestMapping(value = "/user/register")
    public String register() {
        return "register start";
    }


    /**
     * 拦截器不放行的url
     */
    @RequestMapping(value = "/user/login")
    public String login() {
        return "login success";
    }
}
